<%= render 'stocks/form' %>
<table>
  <tr>
    <th>Name</th>
    <th>Company</th>
    <th>Purchase quantity</th>
    <th>Free quantity</th>
    <th>Purchase Date</th>
    <th>Total purchase cost</th>
    <th>Available quantity</th>
    <th>Sale cost</th>
    <th>Tax %</th>
    <th>Commission %</th>
    <th>Seller</th>
    <th></th>
  </tr>

<% @stocks.each do |stock| %>
  <tr>
    <td><%= stock.name %></td>
    <td><%= stock.company %></td>
    <td><%= stock.purchase_quantity %></td>
    <td><%= stock.free_quantity %></td>
    <td><%= stock.purchase_date %></td>
    <td><%= stock.total_purchase_cost %></td>
    <td><%= stock.available_quantity %></td>
    <td><%= stock.sale_cost %></td>
    <td><%= stock.tax_percentage %></td>
    <td><%= stock.commission_percentage %></td>
    <td><%= stock.person_id %></td>
    <td><%= link_to 'Edit', edit_stock_path(stock) %></td>
  </tr>
<% end %>
</table>

